The Good, The Bad, and the Ugly
نویسنده
چکیده
The present R graphics system was originally written as a placeholder, which could be replaced when a better alternative became available. This temporary solution has now become so entrenched that it is probably no longer possible to remove it. In this paper we will look at some of what is possible in the R graphics system, how it could be improved, and what might not be fixable. We will also look at how the existing system might be augmented and see what tradeoffs might be involved in adding an additional graphics system. 1 The R Graphics System Like much of the rest of R, the graphics system was written quickly, with minimal programming resources. The strategy at the time was to implement a basic graphics system and then to revisit the design of the graphics system at a later time. However, other R development tasks have consumed any resources which might have been available for this task, and no rewrite has taken place. Because of the need to work quickly, it was decided to implement the existing API of the S graphics system. As a result, R now has a graphics system is largely compatible with that of the S system, as described in Becker and Chambers [1] or Becker, Chambers, and Wilks [3]. The S graphics system is is based on the Bell Laboratories GR-Z graphics kernel [4] which is itself based on an even older graphics system [5]. It provides a device independent layer which is implemented in terms basic vector primitives, and and underlying set of device drivers which carry out the actual drawing. ∗Department of Statistics, University of Auckland, New Zealand. Proceedings of DSC 2001 2 A good deal of low-level information on GR-Z is available in Becker and Chambers [2], and a descriptive overview is available in Chambers [4]. The author used this information together with some experience of implementing S device drivers as the basis for writing the system. Indeed, the R graphics device driver for the X window system is simply a modified version of an older S driver. The GR-Z graphics system is now quite old and many of the devices it was originally designed to support are now no-longer in common use. Despite this, it must be regarded as one of the most successful systems of its type (other such systems include GKS and Core). Indeed, the quality of the graphics is often given as one of the most important reasons for using S. A good part of this success is almost certainly due to the fact that the graphics system was designed specifically to support graphics for data analysis and not just as a general graphics system. In addition to the S graphics API, R has a number of extensions which users have found useful. In particular, the extension for adding mathematical annotation to plots (Murrell and Ihaka [8]) and a computational model for colour are finding good uses. 2 Key Graphics Features In GR-Z (and hence in the R system) graphical output is produced as a series of one or more figures placed onto a single “page” of output. Each figure contains a central rectangular plot in which data are presented. The margins surrounding the plot contain additional annotation and labels. When multiple figures are placed on a page it is most common to arrange them as a oneor two-way array, but more general layouts are possible. In the case of R, Paul Murrell has implemented some significant additions to the layout facilities [6], [7]. Each figure contains a central plot region which usually contains the figure’s graphical display and is surrounded by margins. The plot region and its margins all have natural coordinate systems. The coordinates of the plot region are determined by the data display and the coordinates of the margin are those of the data display in one direction, and of lines of text in another. The use of margin coordinate systems makes it possible to provide a wide variety of annotation in a plot’s margins. This is a useful feature that even more modern graphics systems often do not provide. It is possible to draw into the plot region and margins with a number of primitive vector graphical operations. S provides the operations: lines lines and polylines points glyph drawing polygons polygon drawing text text drawing A special variant of the text primitive (named mtext) draws text into plot margins using the special coordinate systems for the margins. To these, R has added the special primitive rectangles, because it is such a commonly used operation which can benefit from a special implementation. Proceedings of DSC 2001 3 The S graphics system made the drawing operations device independent, but the implementers of device drivers were left free to use whichever set of colours and line textures they preferred. In R we have endeavoured to bring these features closer to true device independence. In particular, device drivers are passed 24 bit RGB colour specifications and are expected to do the best job they can in rendering these colours. Since devices differ in how they render RGB, this is still not full device independence, but it does allow limited computations to be made on colours. In particular, it is possible to carry out shading computations based on lighting models. This has been used, for example, to add a small amount of visual realism to the persp function.
منابع مشابه
Competition in Healthcare: Good, Bad or Ugly?
The role of competition in healthcare is much debated. Despite a wealth of international experience in relation to competition, evidence is mixed and contested and the debate about the potential role for competition is often polarised. This paper considers briefly some of the reasons for this, focusing on what is meant by “competition in healthcare” and why it is more valuable to think about th...
متن کاملOptimisation of Healthcare Contracts: Tensions Between Standardisation and Innovation; Comment on “Competition in Healthcare: Good, Bad or Ugly?”
An important determinant of health system performance is contracting. Providers often respond to financial incentives, despite the ethical underpinnings of medicine, and payers can craft contracts to influence performance. Yet contracting is highly imperfect in both single-payer and multi-payer health systems. Arguably, in a competitive, multi-payer environment, contractual innovation may occur...
متن کاملGood, bad and ugly: Exploring the Machiavellian power dynamics of leadership in medical education
Introduction: Medical education requires participation of variousstakeholders and this contributes to power dynamics operating atmultiple levels. Personality traits of an individual can affect thesmooth execution of the educational programmes and eventuallythe professionalism of the environment. With the increased focuson leadership traits in medical education and collaboration inhealth care se...
متن کاملThe Good, the Bad, and the Ugly Face Challenge Problem
The Good, the Bad, & the Ugly Face Challenge Problem was created to encourage the development of algorithms that are robust to recognition across changes that occur in still frontal faces. The Good, the Bad, & the Ugly consists of three partitions. The Good partition contains pairs of images that are considered easy to recognize. The base verification rate (VR) is 0.98 at a false accept rate (F...
متن کاملRadiation hormesis: the good, the bad, and the ugly.
Three aspects of hormesis with low doses of ionizing radiation are presented: the good, the bad, and the ugly. The good is acceptance by France, Japan, and China of the thousands of studies showing stimulation and/or benefit, with no harm, from low dose irradiation. This includes thousands of people who live in good health with high background radiation. The bad is the nonacceptance of radiatio...
متن کاملRange Extension for Weak PRFs; The Good, the Bad, and the Ugly
We investigate a general class of (black-box) constructions for range extension of weak pseudorandom functions: a construction based on m independent functions F1, . . . , Fm is given by a set of strings over {1, . . . , m}, where for example {〈2〉, 〈1, 2〉} corresponds to the function X 7→ [F2(X), F2(F1(X))]. All efficient constructions for range expansion of weak pseudorandom functions that we ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001